package com.rui.singleton.model;

/**
 * 饿汉式
 *
 * @author ZhangRui
 * @date 2023/03/02 10:35
 **/
public class EagerSingleton {

    /**
     * 饿汉式创建单例对象
     */
    private static EagerSingleton singleton = new EagerSingleton();

    /**
     * 构造方法私有化
     */
    private EagerSingleton() {

    }

    public static EagerSingleton getInstance() {
        return singleton;
    }


}
